Compilation and Equivalence of Imperative Objects

نویسندگان

  • Andrew D. Gordon
  • Paul D. Hankin
  • Søren B. Lassen
چکیده

We adopt the untyped imperative object calculus of Abadi and Cardelli as a minimal setting in which to study problems of compilation and program equivalence that arise when compiling objectoriented languages. We present both a big-step and a small-step substitution-based operational semantics for the calculus. Our first two results are theorems asserting the equivalence of our substitutionbased semantics with a closure-based semantics like that given by Abadi and Cardelli. Our third result is a direct proof of the correctness of compilation to a stack-based abstract machine via a small-step decompilation algorithm. Our fourth result is that contextual equivalence of objects coincides with a form of Mason and Talcott’s CIU equivalence; the latter provides a tractable means of establishing operational equivalences. Finally, we prove correct an algorithm, used in our prototype compiler, for statically resolving method offsets. This is the first study of correctness of an object-oriented abstract machine, and of operational equivalence for the imperative object calculus.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Coalgebraic Semantics and Observational Equivalences of an Imperative Class-based OO-Language

Fickle is a class-based object oriented imperative language, which extends Java with object re-classification. In this paper, we introduce a natural observational equivalence on Fickle programs. This is a contextual equivalence on main methods with respect to a given sequence of class definitions, i.e. a program. To study it, we use the formal computational model for OO-programming based on coa...

متن کامل

Coalgebraic Semantics of an Imperative Class Based Language

We study two observational equivalences of Fickle programs. Fickle is a class-based object oriented imperative language, which extends Java with object re-classification. The first is a contextual equivalence of expressions with respect to a given program. We provide an adequate coalgebraic semantics for it, which is compositional w.r.t. the operators of the language. The second observational e...

متن کامل

Bisimulations for Untyped Imperative Objects

We present a sound and complete method for reasoning about contextual equivalence in the untyped, imperative object calculus of Abadi and Cardelli [1]. Our method is based on bisimulations, following the work of Sumii and Pierce [25, 26] and our own [14]. Using our method we were able to prove equivalence in more complex examples than the ones of Gordon, Hankin and Lassen [7] and Gordon and Ree...

متن کامل

The Transitive Composability of Relation Transition Systems

Relation Transition Systems (RTSs) have recently been proposed as a foundation for reasoning effectively about program equivalence in higher-order imperative languages like ML. RTSs fruitfully synthesize the coinductive style of bisimulation-based methods with the treatment of local state in recent work on step-indexed Kripke logical relations (SKLRs). Like SKLRs, RTSs are designed to have the ...

متن کامل

Classification based on 3-similarity

Similarity concept, finding the resemblance or classifying some groups of objects and study their common properties has been the interest of many researchers. Basically, in the studies the similarity between two objects or phenomena, 2-similarity in our words, has been discussed. In this paper, we consider the case when the resemblance or similarity among three objects or phenomena of a set, 3-...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997